1. Field of the Invention
The present invention is an output control apparatus of a pulse width modulator; it is especially an output control apparatus that can adjust the output amplitude of a pulse width modulation signal (PWM signal).
2. Description of the Prior Art
The method of audio output of the pulse width modulation (PWM) has been applied to consumer products extensively, especially in portable electronic products. For portable electronic products that use batteries as the power source, the power consumption is one of the most concerned considerations. The biggest advantage of the output method of the PWM is its high power and efficiency.
Please refer to FIG. 1. FIG. 1 is a schematic diagram of an audio output apparatus 10 of the PWM according to the prior art. The audio output apparatus 10 of the PWM according to the prior art comprises a digital volume controller 12, a pulse code modulation to pulse width modulation converter (PCM-to-PWM converter) 14, a PWM output circuit 20, and an speaker 16. To complete an audio output with the PWM technology of the prior art, if adjustment of volume is necessary, it would be done as shown in FIG. 1. The audio data of the audio source is processed by pulse code modulation first; then, the PCM data is transferred to the digital volume controller 12. The user then inputs a volume control signal to make the digital volume controller 12 adjusts the value of the PCM data.
As shown in FIG. 1, the PCM data processed by the digital volume controller 12 is transferred to the PCM-to-PWM converter 14 for converting the PCM data to the PWM signal. Then, via the PWM output circuit 20 triggering the speaker 16, the signal is being sent out as audio sound. Because the PWM output circuit 20 according to the prior art can only output at a fixed level, the value of the PCM data needs to be adjusted to change the duty of the PWM signal output.
Please refer to FIG. 2. FIG. 2 is a schematic diagram of the output circuit 20 and the speaker 16 shown in FIG. 1. The output circuit 20 of the PWM according to the prior art comprises two inverters 22, 24, and four power transistors M0, M1, M2, M3.
As shown in FIG. 2, PI and NI represent the input signals that are differential PWM signal. Through the combination circuit that comprises the power transistors M0xcx9cM3, the output level of the input signal is being controlled at a fixed value. PO and NO represent the output, and the output circuit 20 drives the speaker 16 according to the input signal and the fixed level. The power transistors M0xcx9cM3 can be taken as the switches of the circuit. While the input signal is logic number xe2x80x9c0xe2x80x9d, the power transistors M0 /or M2 are not switched on, but the power transistors M1 /or M3 are switched on. Therefore, the output signal level of the output PO /or NO is close to the low level VSS. While the input signal is logic number xe2x80x9c1xe2x80x9d, the power transistors M1 /or M3 are not switched on, but the power transistors M0 /or M2 are switched on; the output signal level of the outputs PO /or NO is then close to the high level VDD.
The inverters 22, 24 are used for changing the polarity of the input signals PI and NI to make PI/NI and PO/NO in the same phase. PO and NO are the pulse signals with 0xcx9c100% duty, and the converting frequency of the pulse signals may be 10xcx9c100 kilohertz. For the coil within the speaker 16, the equivalent impedance in the converting frequency is very high while the current in the frequency within the coil is very low, so the power consumption is also lower.
Please refer to FIG. 3. FIG. 3 is a schematic diagram of the signal of adjusting the output volume of the output apparatus 10 shown in FIG. 1. Two sets of signal group 32, 34 are shown in FIG. 3. The PWM output signal of the prior art is shown as group 32, and the PWM output signal of the prior art which the volume is reduced by xc2xd is shown as group 34. In FIG. 3, the signals output by PO and NO are described by the differential way, wherein Ts is the signal cycle time, and Td is the duty of each pulse of the output signals. As shown in FIG. 3, in the prior art, the input volume is reduced by reducing the duty of the original PWM output signal, without changing the output level of the signal.
However, the noise of the mixed signal of the PWM output signal becomes bigger with the output level yet doesn""t become smaller with the duty. Therefore, the method of reducing volume of the prior art will show the noise of the background, making the audio quality become worse. In view of this, the present invention proposes a new framework to adjust the volume by adjusting the output pulse level to avoid the problem of worse audio quality at lower volume and to achieve the objective of improving the audio quality.
An objective of the present invention is to provide an output control apparatus of a pulse width modulator for adjusting the output level of the PWM output signal, thus to avoid the problem of the audio quality getting worse with lower volume, and to achieve the objective of improving the audio quality.
The present invention provides an output control apparatus for controlling the output level of a PWM signal at a predetermined level. The output control apparatus comprises an input, a predetermined level input, a base level input, a high level input, a level output, a switch combination, and an amplifier. The input is used for inputting the PWM signal. The predetermined level input is used for providing a predetermined level. The base level input is used for providing a base level. The high level input is used for providing the highest level. The level output is used for outputting an output level of the PWM signal. The switch combination comprises a plurality of switches for connecting to the input, the base level input, and the high level input. The amplifier combination comprises an inverting input for inputting the predetermined level, a non-inverting input for connecting to the output, and an amplifier output for connecting to the switch combination.
While the PWM signal received by the output control apparatus according to the present invention is logic number xe2x80x9c0xe2x80x9d, the switch combination switches on the base level input and connects the amplifier output of each amplifier within the amplifier combination to the high level input, making the amplifier combination not being switched on, so as to control the level of the PWM signal at the base level.
While the PWM signal received by the output control apparatus is logic number xe2x80x9c1xe2x80x9d, the switch combination doesn""t switch on the base level input and connects the amplifier output of each the amplifier to the level output to make the amplifier combination and the switch combination form a negative feedback loop, so as to control the level of the PWM signal at the predetermined level.
A control signal generator and a DAC generate the predetermined level input by the predetermined level input of the present invention. The control signal generator, according to the user control, generates various digital control signals and transfers the signals to the DAC. The DAC converts the digital control signals to a corresponding predetermined level and inputs the predetermined level to the output control apparatus via the predetermined level input.
Therefore, the present invention achieves the objective of adjusting the output amplitude of the PWM signal by controlling the predetermined level and improves the problem that the prior art has, which is to reduce the output volume only by improving the duty of the PWM signal but enlarging the mixed signals.
The advantage and spirit of the present invention may be understood by the following recitations together with the appended drawings.